<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="hello8">
        <p>time1 {{ cu1() }}</p>
        <p>time2: {{ cu1 }}</p>
        <p>time2: {{ cu2 }}</p>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>

    <script>
        var vm = new Vue({
            el: "#hello8",
            methods: {
                cu1: () => { // 调用方法要带括号
                    return Date.now();
                }
            },
            computed: {
                cu2: () => { //不要和方法重名   优先执行方法  属性不用带括号
                    return Date.now();
                },
                cu1: () => {
                    return Date.now();
                }
            }
        })
    </script>
</body>

</html>